/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.documentar.view;

import br.com.documentar.controller.AssociarClienteVersaoController;
import br.com.documentar.controller.ClienteController;
import br.com.documentar.controller.ColaboradorController;
import br.com.documentar.controller.ConfigBancoDadosController;
import br.com.documentar.controller.CronogramaAtualizacaoController;
import br.com.documentar.interfacee.InterfaceView;
import br.com.documentar.model.AssociarClienteVersaoModel;
import br.com.documentar.model.ClienteModel;
import br.com.documentar.model.ColaboradorModel;
import br.com.documentar.model.ConfigBancoDadosModel;
import br.com.documentar.model.CronogramaAtualizacaoModel;
import br.com.documentar.util.UtilitariosCampos;
import br.com.documentar.util.setFiltroCampo;
import java.awt.Color;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import javax.swing.JOptionPane;

/**
 *
 * @author Santos
 */
public class CronogramaAtualizacaoAtualizarView extends javax.swing.JFrame implements InterfaceView<br.com.documentar.model.CronogramaAtualizacaoModel> {

    private br.com.documentar.controller.CronogramaAtualizacaoController control = new br.com.documentar.controller.CronogramaAtualizacaoController();
    private br.com.documentar.model.CronogramaAtualizacaoModel model = control.getModel();

    /**
     * Creates new form ProdutoController
     */
    public CronogramaAtualizacaoAtualizarView() {
        initComponents();
        Start();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        tabbedPaneManutencao = new javax.swing.JTabbedPane();
        panelConsulta = new javax.swing.JPanel();
        jLabelNome = new javax.swing.JLabel();
        textFieldConsultar = new javax.swing.JTextField();
        jScrollPanelConsulta = new javax.swing.JScrollPane();
        jTableConsulta = new javax.swing.JTable();
        panelAbaDadosGerais = new javax.swing.JPanel();
        jLabel26 = new javax.swing.JLabel();
        comboBoxTecnico = new javax.swing.JComboBox();
        jLabel27 = new javax.swing.JLabel();
        formattedTextFieldDataSaida = new javax.swing.JFormattedTextField();
        jLabel28 = new javax.swing.JLabel();
        comboBoxLocalRemota = new javax.swing.JComboBox();
        jLabel29 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        textAreaObservacao = new javax.swing.JTextArea();
        jLabel30 = new javax.swing.JLabel();
        checkBoxERP = new javax.swing.JCheckBox();
        checkBoxNFE = new javax.swing.JCheckBox();
        checkBoxFrenteLoja = new javax.swing.JCheckBox();
        checkBoxWMS = new javax.swing.JCheckBox();
        checkBoxProducao = new javax.swing.JCheckBox();
        panelAbaACadastro = new javax.swing.JPanel();
        jScrollPaneManutencaoA = new javax.swing.JScrollPane();
        jPanelManutencaoA = new javax.swing.JPanel();
        panelERP = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        textFieldIpERP = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        textFieldNomeBancoERP = new javax.swing.JTextField();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel4 = new javax.swing.JLabel();
        textFieldPortaERP = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        textFieldUsuarioERP = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        passwordFieldSenhaERP = new javax.swing.JPasswordField();
        panelNFE = new javax.swing.JPanel();
        jSeparator2 = new javax.swing.JSeparator();
        textFieldPortaNFE = new javax.swing.JTextField();
        textFieldUsuarioNFE = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        passwordFieldSenhaNFE = new javax.swing.JPasswordField();
        jLabel8 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        textFieldNomeBancoNFE = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        textFieldIpNFE = new javax.swing.JTextField();
        panelAbaBCadastro = new javax.swing.JPanel();
        jScrollPaneManutencaoA1 = new javax.swing.JScrollPane();
        jPanelManutencaoA1 = new javax.swing.JPanel();
        panelPDV = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        textFieldIpPDV = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        textFieldNomeBancoSrvPDV = new javax.swing.JTextField();
        jSeparator3 = new javax.swing.JSeparator();
        jLabel13 = new javax.swing.JLabel();
        textFieldPortaPDV = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        textFieldUsuarioPDV = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        passwordFieldSenhaPDV = new javax.swing.JPasswordField();
        textFieldNomeBancoEcfPDV = new javax.swing.JTextField();
        panelWMS = new javax.swing.JPanel();
        jSeparator4 = new javax.swing.JSeparator();
        textFieldPortaWMS = new javax.swing.JTextField();
        textFieldUsuarioWMS = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        passwordFieldSenhaWMS = new javax.swing.JPasswordField();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        textFieldNomeBancoWMS = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        textFieldIpWMS = new javax.swing.JTextField();
        panelAbaCCadastro = new javax.swing.JPanel();
        jScrollPaneManutencaoA2 = new javax.swing.JScrollPane();
        jPanelManutencaoA2 = new javax.swing.JPanel();
        panelProducao = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        textFieldIpProducao = new javax.swing.JTextField();
        jLabel22 = new javax.swing.JLabel();
        textFieldNomeBancoProducao = new javax.swing.JTextField();
        jSeparator5 = new javax.swing.JSeparator();
        jLabel23 = new javax.swing.JLabel();
        textFieldPortaProducao = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        textFieldUsuarioProducao = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        passwordFieldSenhaProducao = new javax.swing.JPasswordField();
        panelAbaRelatorio = new javax.swing.JPanel();
        toolBarManutencao = new javax.swing.JToolBar();
        buttonConsultar = new javax.swing.JButton();
        buttonNovo = new javax.swing.JButton();
        buttonEditar = new javax.swing.JButton();
        buttonExcluir = new javax.swing.JButton();
        buttonCancelar = new javax.swing.JButton();
        buttonGravar = new javax.swing.JButton();
        buttonRelatorio = new javax.swing.JButton();
        buttonAnterior = new javax.swing.JButton();
        buttonProximo = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Atualizar Cronograma de Atualização");

        jLabelNome.setText("Pesquisar:");

        jTableConsulta.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jTableConsulta.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jTableConsulta.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jTableConsulta.getTableHeader().setReorderingAllowed(false);
        jScrollPanelConsulta.setViewportView(jTableConsulta);

        javax.swing.GroupLayout panelConsultaLayout = new javax.swing.GroupLayout(panelConsulta);
        panelConsulta.setLayout(panelConsultaLayout);
        panelConsultaLayout.setHorizontalGroup(
            panelConsultaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelConsultaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabelNome)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(textFieldConsultar, javax.swing.GroupLayout.DEFAULT_SIZE, 627, Short.MAX_VALUE)
                .addContainerGap())
            .addComponent(jScrollPanelConsulta, javax.swing.GroupLayout.DEFAULT_SIZE, 701, Short.MAX_VALUE)
        );
        panelConsultaLayout.setVerticalGroup(
            panelConsultaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelConsultaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelConsultaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelNome)
                    .addComponent(textFieldConsultar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPanelConsulta, javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE))
        );

        tabbedPaneManutencao.addTab("Consulta", panelConsulta);

        jLabel26.setText("Técnico:");

        comboBoxTecnico.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ESCOLHER" }));

        jLabel27.setText("Data de Saída:");

        try {
            formattedTextFieldDataSaida.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("####-##-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel28.setText("Local/Remota:");

        comboBoxLocalRemota.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ESCOLHER", "A - REMOTA", "B - LOCAL" }));

        jLabel29.setText("Observações:");

        textAreaObservacao.setColumns(20);
        textAreaObservacao.setRows(5);
        jScrollPane1.setViewportView(textAreaObservacao);

        jLabel30.setText("Produtos Atualizados:");

        checkBoxERP.setText("ERP");

        checkBoxNFE.setText("NF-e");

        checkBoxFrenteLoja.setText("Frente de Loja (PDV)");

        checkBoxWMS.setText("WMS");

        checkBoxProducao.setText("Sistema de Produção");
        checkBoxProducao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkBoxProducaoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelAbaDadosGeraisLayout = new javax.swing.GroupLayout(panelAbaDadosGerais);
        panelAbaDadosGerais.setLayout(panelAbaDadosGeraisLayout);
        panelAbaDadosGeraisLayout.setHorizontalGroup(
            panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelAbaDadosGeraisLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel26)
                    .addComponent(jLabel27)
                    .addComponent(jLabel28)
                    .addComponent(jLabel29)
                    .addComponent(jLabel30))
                .addGap(57, 57, 57)
                .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(comboBoxTecnico, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane1)
                    .addGroup(panelAbaDadosGeraisLayout.createSequentialGroup()
                        .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(checkBoxERP)
                            .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(formattedTextFieldDataSaida)
                                .addComponent(comboBoxLocalRemota, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(checkBoxFrenteLoja)
                            .addComponent(checkBoxNFE))
                        .addGap(104, 104, 104)
                        .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(checkBoxProducao)
                            .addComponent(checkBoxWMS))
                        .addGap(0, 151, Short.MAX_VALUE)))
                .addGap(14, 14, 14))
        );
        panelAbaDadosGeraisLayout.setVerticalGroup(
            panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelAbaDadosGeraisLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(comboBoxTecnico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel27)
                    .addComponent(formattedTextFieldDataSaida, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28)
                    .addComponent(comboBoxLocalRemota, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel29)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelAbaDadosGeraisLayout.createSequentialGroup()
                        .addComponent(checkBoxWMS)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(checkBoxProducao))
                    .addGroup(panelAbaDadosGeraisLayout.createSequentialGroup()
                        .addGroup(panelAbaDadosGeraisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(checkBoxERP)
                            .addComponent(jLabel30))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(checkBoxNFE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(checkBoxFrenteLoja)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tabbedPaneManutencao.addTab("Dados Gerais", panelAbaDadosGerais);

        jLabel1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel1.setText("IP:");

        textFieldIpERP.setText("localhost");

        jLabel2.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel2.setText("Nome Banco:");

        textFieldNomeBancoERP.setText("dbsantos");
        textFieldNomeBancoERP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldNomeBancoERPActionPerformed(evt);
            }
        });

        jSeparator1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Servidor ERP", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        jLabel4.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel4.setText("Porta:");

        textFieldPortaERP.setText("1521");
        textFieldPortaERP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldPortaERPActionPerformed(evt);
            }
        });

        jLabel5.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel5.setText("Usuário:");

        textFieldUsuarioERP.setText("appuser");
        textFieldUsuarioERP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldUsuarioERPActionPerformed(evt);
            }
        });

        jLabel6.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel6.setText("Senha:");

        passwordFieldSenhaERP.setText("app1234");

        javax.swing.GroupLayout panelERPLayout = new javax.swing.GroupLayout(panelERP);
        panelERP.setLayout(panelERPLayout);
        panelERPLayout.setHorizontalGroup(
            panelERPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelERPLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelERPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel4)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6))
                .addGap(117, 117, 117)
                .addGroup(panelERPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(textFieldNomeBancoERP)
                    .addComponent(textFieldIpERP)
                    .addComponent(textFieldPortaERP)
                    .addComponent(textFieldUsuarioERP)
                    .addComponent(passwordFieldSenhaERP, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(255, Short.MAX_VALUE))
            .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        panelERPLayout.setVerticalGroup(
            panelERPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelERPLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelERPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldIpERP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelERPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldNomeBancoERP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelERPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldPortaERP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelERPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldUsuarioERP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelERPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(passwordFieldSenhaERP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(19, Short.MAX_VALUE))
        );

        jSeparator2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Servidor NF-e", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        textFieldPortaNFE.setText("5432");
        textFieldPortaNFE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldPortaNFEActionPerformed(evt);
            }
        });

        textFieldUsuarioNFE.setText("nfe");
        textFieldUsuarioNFE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldUsuarioNFEActionPerformed(evt);
            }
        });

        jLabel7.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel7.setText("Usuário:");

        passwordFieldSenhaNFE.setText("nfe");

        jLabel8.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel8.setText("Senha:");

        jLabel3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel3.setText("Nome Banco:");

        textFieldNomeBancoNFE.setText("nfe");
        textFieldNomeBancoNFE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldNomeBancoNFEActionPerformed(evt);
            }
        });

        jLabel9.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel9.setText("IP:");

        jLabel10.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel10.setText("Porta:");

        javax.swing.GroupLayout panelNFELayout = new javax.swing.GroupLayout(panelNFE);
        panelNFE.setLayout(panelNFELayout);
        panelNFELayout.setHorizontalGroup(
            panelNFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelNFELayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelNFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel9)
                    .addComponent(jLabel3)
                    .addComponent(jLabel10)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8))
                .addGap(117, 117, 117)
                .addGroup(panelNFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(textFieldNomeBancoNFE)
                    .addComponent(textFieldIpNFE)
                    .addComponent(textFieldPortaNFE)
                    .addComponent(textFieldUsuarioNFE)
                    .addComponent(passwordFieldSenhaNFE, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        panelNFELayout.setVerticalGroup(
            panelNFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelNFELayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelNFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldIpNFE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelNFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldNomeBancoNFE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelNFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldPortaNFE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelNFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldUsuarioNFE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelNFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(passwordFieldSenhaNFE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(16, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanelManutencaoALayout = new javax.swing.GroupLayout(jPanelManutencaoA);
        jPanelManutencaoA.setLayout(jPanelManutencaoALayout);
        jPanelManutencaoALayout.setHorizontalGroup(
            jPanelManutencaoALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelERP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelNFE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanelManutencaoALayout.setVerticalGroup(
            jPanelManutencaoALayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelManutencaoALayout.createSequentialGroup()
                .addComponent(panelERP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelNFE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(29, Short.MAX_VALUE))
        );

        jScrollPaneManutencaoA.setViewportView(jPanelManutencaoA);

        javax.swing.GroupLayout panelAbaACadastroLayout = new javax.swing.GroupLayout(panelAbaACadastro);
        panelAbaACadastro.setLayout(panelAbaACadastroLayout);
        panelAbaACadastroLayout.setHorizontalGroup(
            panelAbaACadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPaneManutencaoA)
        );
        panelAbaACadastroLayout.setVerticalGroup(
            panelAbaACadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPaneManutencaoA)
        );

        tabbedPaneManutencao.addTab("Pagina A", panelAbaACadastro);

        jLabel11.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel11.setText("IP:");

        textFieldIpPDV.setText("localhost");

        jLabel12.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel12.setText("Nome Banco:");

        textFieldNomeBancoSrvPDV.setText("C:\\Proton\\pdv-server\\dat\\DBSRV.GDB");
        textFieldNomeBancoSrvPDV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldNomeBancoSrvPDVActionPerformed(evt);
            }
        });

        jSeparator3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Servidor Frente de Loja (PDV)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        jLabel13.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel13.setText("Porta:");

        textFieldPortaPDV.setText("3050");
        textFieldPortaPDV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldPortaPDVActionPerformed(evt);
            }
        });

        jLabel14.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel14.setText("Usuário:");

        textFieldUsuarioPDV.setText("sysdba");
        textFieldUsuarioPDV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldUsuarioPDVActionPerformed(evt);
            }
        });

        jLabel15.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel15.setText("Senha:");

        passwordFieldSenhaPDV.setText("masterkey");

        textFieldNomeBancoEcfPDV.setText("C:\\proton\\pdv-client\\dat\\DBECF.GDB");
        textFieldNomeBancoEcfPDV.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldNomeBancoEcfPDVActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelPDVLayout = new javax.swing.GroupLayout(panelPDV);
        panelPDV.setLayout(panelPDVLayout);
        panelPDVLayout.setHorizontalGroup(
            panelPDVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPDVLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelPDVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel11)
                    .addComponent(jLabel12)
                    .addComponent(jLabel13)
                    .addComponent(jLabel14)
                    .addComponent(jLabel15))
                .addGap(117, 117, 117)
                .addGroup(panelPDVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(textFieldNomeBancoSrvPDV)
                    .addComponent(textFieldIpPDV)
                    .addComponent(textFieldPortaPDV)
                    .addComponent(textFieldUsuarioPDV)
                    .addComponent(passwordFieldSenhaPDV, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(3, 3, 3)
                .addComponent(textFieldNomeBancoEcfPDV)
                .addContainerGap())
            .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        panelPDVLayout.setVerticalGroup(
            panelPDVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPDVLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelPDVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldIpPDV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelPDVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldNomeBancoSrvPDV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12)
                    .addComponent(textFieldNomeBancoEcfPDV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelPDVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldPortaPDV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelPDVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldUsuarioPDV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelPDVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(passwordFieldSenhaPDV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(19, Short.MAX_VALUE))
        );

        jSeparator4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Servidor WMS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        textFieldPortaWMS.setText("1521");
        textFieldPortaWMS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldPortaWMSActionPerformed(evt);
            }
        });

        textFieldUsuarioWMS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldUsuarioWMSActionPerformed(evt);
            }
        });

        jLabel16.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel16.setText("Usuário:");

        jLabel17.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel17.setText("Senha:");

        jLabel18.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel18.setText("Nome Banco:");

        textFieldNomeBancoWMS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldNomeBancoWMSActionPerformed(evt);
            }
        });

        jLabel19.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel19.setText("IP:");

        jLabel20.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel20.setText("Porta:");

        javax.swing.GroupLayout panelWMSLayout = new javax.swing.GroupLayout(panelWMS);
        panelWMS.setLayout(panelWMSLayout);
        panelWMSLayout.setHorizontalGroup(
            panelWMSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelWMSLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelWMSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel19)
                    .addComponent(jLabel18)
                    .addComponent(jLabel20)
                    .addComponent(jLabel16)
                    .addComponent(jLabel17))
                .addGap(117, 117, 117)
                .addGroup(panelWMSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(textFieldNomeBancoWMS)
                    .addComponent(textFieldIpWMS)
                    .addComponent(textFieldPortaWMS)
                    .addComponent(textFieldUsuarioWMS)
                    .addComponent(passwordFieldSenhaWMS, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jSeparator4, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        panelWMSLayout.setVerticalGroup(
            panelWMSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelWMSLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelWMSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldIpWMS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelWMSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldNomeBancoWMS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelWMSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldPortaWMS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel20))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelWMSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldUsuarioWMS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelWMSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(passwordFieldSenhaWMS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanelManutencaoA1Layout = new javax.swing.GroupLayout(jPanelManutencaoA1);
        jPanelManutencaoA1.setLayout(jPanelManutencaoA1Layout);
        jPanelManutencaoA1Layout.setHorizontalGroup(
            jPanelManutencaoA1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelPDV, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelWMS, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanelManutencaoA1Layout.setVerticalGroup(
            jPanelManutencaoA1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelManutencaoA1Layout.createSequentialGroup()
                .addComponent(panelPDV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelWMS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jScrollPaneManutencaoA1.setViewportView(jPanelManutencaoA1);

        javax.swing.GroupLayout panelAbaBCadastroLayout = new javax.swing.GroupLayout(panelAbaBCadastro);
        panelAbaBCadastro.setLayout(panelAbaBCadastroLayout);
        panelAbaBCadastroLayout.setHorizontalGroup(
            panelAbaBCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPaneManutencaoA1)
        );
        panelAbaBCadastroLayout.setVerticalGroup(
            panelAbaBCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPaneManutencaoA1, javax.swing.GroupLayout.DEFAULT_SIZE, 384, Short.MAX_VALUE)
        );

        tabbedPaneManutencao.addTab("Pagina B", panelAbaBCadastro);

        jLabel21.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel21.setText("IP:");

        jLabel22.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel22.setText("Nome Banco:");

        textFieldNomeBancoProducao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldNomeBancoProducaoActionPerformed(evt);
            }
        });

        jSeparator5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Servidor Sistema de Produção", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N

        jLabel23.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel23.setText("Porta:");

        textFieldPortaProducao.setText("1521");
        textFieldPortaProducao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldPortaProducaoActionPerformed(evt);
            }
        });

        jLabel24.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel24.setText("Usuário:");

        textFieldUsuarioProducao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldUsuarioProducaoActionPerformed(evt);
            }
        });

        jLabel25.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel25.setText("Senha:");

        javax.swing.GroupLayout panelProducaoLayout = new javax.swing.GroupLayout(panelProducao);
        panelProducao.setLayout(panelProducaoLayout);
        panelProducaoLayout.setHorizontalGroup(
            panelProducaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelProducaoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelProducaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel21)
                    .addComponent(jLabel22)
                    .addComponent(jLabel23)
                    .addComponent(jLabel24)
                    .addComponent(jLabel25))
                .addGap(117, 117, 117)
                .addGroup(panelProducaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(textFieldNomeBancoProducao)
                    .addComponent(textFieldIpProducao)
                    .addComponent(textFieldPortaProducao)
                    .addComponent(textFieldUsuarioProducao)
                    .addComponent(passwordFieldSenhaProducao, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(255, Short.MAX_VALUE))
            .addComponent(jSeparator5, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        panelProducaoLayout.setVerticalGroup(
            panelProducaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelProducaoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelProducaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldIpProducao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel21))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelProducaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldNomeBancoProducao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel22))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelProducaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldPortaProducao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelProducaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textFieldUsuarioProducao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel24))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelProducaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(passwordFieldSenhaProducao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanelManutencaoA2Layout = new javax.swing.GroupLayout(jPanelManutencaoA2);
        jPanelManutencaoA2.setLayout(jPanelManutencaoA2Layout);
        jPanelManutencaoA2Layout.setHorizontalGroup(
            jPanelManutencaoA2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelProducao, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanelManutencaoA2Layout.setVerticalGroup(
            jPanelManutencaoA2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelManutencaoA2Layout.createSequentialGroup()
                .addComponent(panelProducao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 204, Short.MAX_VALUE))
        );

        jScrollPaneManutencaoA2.setViewportView(jPanelManutencaoA2);

        javax.swing.GroupLayout panelAbaCCadastroLayout = new javax.swing.GroupLayout(panelAbaCCadastro);
        panelAbaCCadastro.setLayout(panelAbaCCadastroLayout);
        panelAbaCCadastroLayout.setHorizontalGroup(
            panelAbaCCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPaneManutencaoA2)
        );
        panelAbaCCadastroLayout.setVerticalGroup(
            panelAbaCCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPaneManutencaoA2)
        );

        tabbedPaneManutencao.addTab("Pagina C", panelAbaCCadastro);

        javax.swing.GroupLayout panelAbaRelatorioLayout = new javax.swing.GroupLayout(panelAbaRelatorio);
        panelAbaRelatorio.setLayout(panelAbaRelatorioLayout);
        panelAbaRelatorioLayout.setHorizontalGroup(
            panelAbaRelatorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 701, Short.MAX_VALUE)
        );
        panelAbaRelatorioLayout.setVerticalGroup(
            panelAbaRelatorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 384, Short.MAX_VALUE)
        );

        tabbedPaneManutencao.addTab("Relatório", panelAbaRelatorio);

        toolBarManutencao.setFloatable(false);
        toolBarManutencao.setRollover(true);

        buttonConsultar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/documentar/iconesManutencoes/application_form_magnify.png"))); // NOI18N
        buttonConsultar.setMnemonic('l');
        buttonConsultar.setText("Consultar");
        buttonConsultar.setFocusable(false);
        buttonConsultar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonConsultar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonConsultar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonConsultarActionPerformed(evt);
            }
        });
        toolBarManutencao.add(buttonConsultar);

        buttonNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/documentar/iconesManutencoes/application_add.png"))); // NOI18N
        buttonNovo.setMnemonic('N');
        buttonNovo.setText("Novo");
        buttonNovo.setFocusable(false);
        buttonNovo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonNovo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonNovo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonNovoActionPerformed(evt);
            }
        });
        toolBarManutencao.add(buttonNovo);

        buttonEditar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/documentar/iconesManutencoes/application_edit.png"))); // NOI18N
        buttonEditar.setMnemonic('E');
        buttonEditar.setText("Editar");
        buttonEditar.setFocusable(false);
        buttonEditar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonEditar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonEditar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonEditarActionPerformed(evt);
            }
        });
        toolBarManutencao.add(buttonEditar);

        buttonExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/documentar/iconesManutencoes/application_delete.png"))); // NOI18N
        buttonExcluir.setMnemonic('x');
        buttonExcluir.setText("Excluir");
        buttonExcluir.setFocusable(false);
        buttonExcluir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonExcluir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonExcluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonExcluirActionPerformed(evt);
            }
        });
        toolBarManutencao.add(buttonExcluir);

        buttonCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/documentar/iconesManutencoes/cancel.png"))); // NOI18N
        buttonCancelar.setMnemonic('C');
        buttonCancelar.setText("Cancelar");
        buttonCancelar.setFocusable(false);
        buttonCancelar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonCancelar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonCancelarActionPerformed(evt);
            }
        });
        toolBarManutencao.add(buttonCancelar);

        buttonGravar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/documentar/iconesManutencoes/accept.png"))); // NOI18N
        buttonGravar.setMnemonic('a');
        buttonGravar.setText("Gravar");
        buttonGravar.setFocusable(false);
        buttonGravar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonGravar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonGravar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonGravarActionPerformed(evt);
            }
        });
        toolBarManutencao.add(buttonGravar);

        buttonRelatorio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/documentar/iconesManutencoes/application_side_list.png"))); // NOI18N
        buttonRelatorio.setMnemonic('R');
        buttonRelatorio.setText("Relatório");
        buttonRelatorio.setFocusable(false);
        buttonRelatorio.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonRelatorio.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonRelatorio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonRelatorioActionPerformed(evt);
            }
        });
        toolBarManutencao.add(buttonRelatorio);

        buttonAnterior.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/documentar/iconesManutencoes/arrow_left.png"))); // NOI18N
        buttonAnterior.setMnemonic('o');
        buttonAnterior.setText("Anterior");
        buttonAnterior.setFocusable(false);
        buttonAnterior.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonAnterior.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonAnterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonAnteriorActionPerformed(evt);
            }
        });
        toolBarManutencao.add(buttonAnterior);

        buttonProximo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/documentar/iconesManutencoes/arrow_right.png"))); // NOI18N
        buttonProximo.setMnemonic('m');
        buttonProximo.setText("Próximo");
        buttonProximo.setFocusable(false);
        buttonProximo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonProximo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonProximo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonProximoActionPerformed(evt);
            }
        });
        toolBarManutencao.add(buttonProximo);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(tabbedPaneManutencao)
            .addComponent(toolBarManutencao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(toolBarManutencao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tabbedPaneManutencao))
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void buttonConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonConsultarActionPerformed
        Consultar();
    }//GEN-LAST:event_buttonConsultarActionPerformed

    private void buttonNovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonNovoActionPerformed
        CarregarNovoDados();
    }//GEN-LAST:event_buttonNovoActionPerformed

    private void buttonEditarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEditarActionPerformed
        CarregarEditarDados();
    }//GEN-LAST:event_buttonEditarActionPerformed

    private void buttonExcluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExcluirActionPerformed
        CarregarExcluirDados();
    }//GEN-LAST:event_buttonExcluirActionPerformed

    private void buttonCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCancelarActionPerformed
        CancelarOperacao();
    }//GEN-LAST:event_buttonCancelarActionPerformed

    private void buttonGravarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonGravarActionPerformed
        GravarDados();
    }//GEN-LAST:event_buttonGravarActionPerformed

    private void buttonRelatorioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonRelatorioActionPerformed
        tabbedPaneManutencao.setSelectedIndex(5);
    }//GEN-LAST:event_buttonRelatorioActionPerformed

    private void buttonAnteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAnteriorActionPerformed
        ProximaAba("Anterior");
    }//GEN-LAST:event_buttonAnteriorActionPerformed

  private void buttonProximoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonProximoActionPerformed
      ProximaAba("Proximo");
  }//GEN-LAST:event_buttonProximoActionPerformed

    private void textFieldNomeBancoERPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldNomeBancoERPActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldNomeBancoERPActionPerformed

    private void textFieldPortaERPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldPortaERPActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldPortaERPActionPerformed

    private void textFieldUsuarioERPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldUsuarioERPActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldUsuarioERPActionPerformed

    private void textFieldPortaNFEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldPortaNFEActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldPortaNFEActionPerformed

    private void textFieldUsuarioNFEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldUsuarioNFEActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldUsuarioNFEActionPerformed

    private void textFieldNomeBancoNFEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldNomeBancoNFEActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldNomeBancoNFEActionPerformed

    private void textFieldNomeBancoSrvPDVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldNomeBancoSrvPDVActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldNomeBancoSrvPDVActionPerformed

    private void textFieldPortaPDVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldPortaPDVActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldPortaPDVActionPerformed

    private void textFieldUsuarioPDVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldUsuarioPDVActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldUsuarioPDVActionPerformed

    private void textFieldPortaWMSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldPortaWMSActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldPortaWMSActionPerformed

    private void textFieldUsuarioWMSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldUsuarioWMSActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldUsuarioWMSActionPerformed

    private void textFieldNomeBancoWMSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldNomeBancoWMSActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldNomeBancoWMSActionPerformed

    private void textFieldNomeBancoProducaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldNomeBancoProducaoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldNomeBancoProducaoActionPerformed

    private void textFieldPortaProducaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldPortaProducaoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldPortaProducaoActionPerformed

    private void textFieldUsuarioProducaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldUsuarioProducaoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldUsuarioProducaoActionPerformed

    private void checkBoxProducaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkBoxProducaoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_checkBoxProducaoActionPerformed

    private void textFieldNomeBancoEcfPDVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldNomeBancoEcfPDVActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldNomeBancoEcfPDVActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main() {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(CronogramaAtualizacaoAtualizarView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(CronogramaAtualizacaoAtualizarView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(CronogramaAtualizacaoAtualizarView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(CronogramaAtualizacaoAtualizarView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new CronogramaAtualizacaoAtualizarView().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton buttonAnterior;
    private javax.swing.JButton buttonCancelar;
    protected javax.swing.JButton buttonConsultar;
    private javax.swing.JButton buttonEditar;
    private javax.swing.JButton buttonExcluir;
    private javax.swing.JButton buttonGravar;
    private javax.swing.JButton buttonNovo;
    private javax.swing.JButton buttonProximo;
    private javax.swing.JButton buttonRelatorio;
    private javax.swing.JCheckBox checkBoxERP;
    private javax.swing.JCheckBox checkBoxFrenteLoja;
    private javax.swing.JCheckBox checkBoxNFE;
    private javax.swing.JCheckBox checkBoxProducao;
    private javax.swing.JCheckBox checkBoxWMS;
    private javax.swing.JComboBox comboBoxLocalRemota;
    private javax.swing.JComboBox comboBoxTecnico;
    private javax.swing.JFormattedTextField formattedTextFieldDataSaida;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelNome;
    private javax.swing.JPanel jPanelManutencaoA;
    private javax.swing.JPanel jPanelManutencaoA1;
    private javax.swing.JPanel jPanelManutencaoA2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPaneManutencaoA;
    private javax.swing.JScrollPane jScrollPaneManutencaoA1;
    private javax.swing.JScrollPane jScrollPaneManutencaoA2;
    private javax.swing.JScrollPane jScrollPanelConsulta;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JTable jTableConsulta;
    private javax.swing.JPanel panelAbaACadastro;
    private javax.swing.JPanel panelAbaBCadastro;
    private javax.swing.JPanel panelAbaCCadastro;
    private javax.swing.JPanel panelAbaDadosGerais;
    private javax.swing.JPanel panelAbaRelatorio;
    private javax.swing.JPanel panelConsulta;
    private javax.swing.JPanel panelERP;
    private javax.swing.JPanel panelNFE;
    private javax.swing.JPanel panelPDV;
    private javax.swing.JPanel panelProducao;
    private javax.swing.JPanel panelWMS;
    private javax.swing.JPasswordField passwordFieldSenhaERP;
    private javax.swing.JPasswordField passwordFieldSenhaNFE;
    private javax.swing.JPasswordField passwordFieldSenhaPDV;
    private javax.swing.JPasswordField passwordFieldSenhaProducao;
    private javax.swing.JPasswordField passwordFieldSenhaWMS;
    private javax.swing.JTabbedPane tabbedPaneManutencao;
    private javax.swing.JTextArea textAreaObservacao;
    private javax.swing.JTextField textFieldConsultar;
    private javax.swing.JTextField textFieldIpERP;
    private javax.swing.JTextField textFieldIpNFE;
    private javax.swing.JTextField textFieldIpPDV;
    private javax.swing.JTextField textFieldIpProducao;
    private javax.swing.JTextField textFieldIpWMS;
    private javax.swing.JTextField textFieldNomeBancoERP;
    private javax.swing.JTextField textFieldNomeBancoEcfPDV;
    private javax.swing.JTextField textFieldNomeBancoNFE;
    private javax.swing.JTextField textFieldNomeBancoProducao;
    private javax.swing.JTextField textFieldNomeBancoSrvPDV;
    private javax.swing.JTextField textFieldNomeBancoWMS;
    private javax.swing.JTextField textFieldPortaERP;
    private javax.swing.JTextField textFieldPortaNFE;
    private javax.swing.JTextField textFieldPortaPDV;
    private javax.swing.JTextField textFieldPortaProducao;
    private javax.swing.JTextField textFieldPortaWMS;
    private javax.swing.JTextField textFieldUsuarioERP;
    private javax.swing.JTextField textFieldUsuarioNFE;
    private javax.swing.JTextField textFieldUsuarioPDV;
    private javax.swing.JTextField textFieldUsuarioProducao;
    private javax.swing.JTextField textFieldUsuarioWMS;
    private javax.swing.JToolBar toolBarManutencao;
    // End of variables declaration//GEN-END:variables

    @Override
    public void CarregarEditarDados() {
        model.setActionScript("U");
        if (jTableConsulta.getSelectedRow() != -1) {
            /*       ClienteModel produtoModel = model.getCliente(UtilitariosCampos.getIntegerTable(jTableConsulta, 0));
             texttextFieldIpERPText(UtilitariosCampos.getIntegerText(textFieldNomeBancoERPgetCodigo()));
             textFieldNome.setText(produtoModel.getNome());
             UtilitariosCampos.setRespostaComboBox(comboBoxAtivo, produtoModel.getAtivo());
             tabbedPaneManutencao.setSelectedIndex(1);
             textFieldNomeBancoERPeldIpERPnabled(false);
             textFieldNome.requestFocus();
             */
            JOptionPane.showMessageDialog(rootPane, "Recurso não implementado!!!");
        } else {
            JOptionPane.showMessageDialog(rootPane, "Nenhuma linha selecionada");
        }
    }

    @Override
    public void CarregarNovoDados() {
        model.setActionScript("I");
        tabbedPaneManutencao.setSelectedIndex(1);
        comboBoxTecnico.requestFocus();
    }

    @Override
    public void CarregarExcluirDados() {
        /* if (jTableConsulta.getSelectedRow() != -1) {
         ClienteModel produtoModel = model.getCliente(UtilitariosCampos.getIntegerTable(jTableConsulta, 0));
         produtoModel.setActionScript("D");
         control.setDados(produtoModel);
         } else {
         JOptionPane.showMessageDialog(rootPane, "Nenhuma linha selecionada");
         }*/
        JOptionPane.showMessageDialog(rootPane, "Recurso não implementado");
        Consultar();
    }

    @Override
    public void GravarDados() {
        if (ValidaCampos()) {
            if (model.getActionScript().equals("I") || model.getActionScript().equals("U")) {
                CarregarVariaveis();

                /**
                 * Persistir dados ERP
                 */
                if (checkBoxERP.isSelected()) {

                    /**
                     * Verificar se os dados de conexão com o Oracle são
                     * validos. Se não conectar, o sistema irá interromper a
                     * execução dos passos
                     */
                    ConfigBancoDadosController configBancoDadosControl = new ConfigBancoDadosController();
                    ConfigBancoDadosModel configBancoDadosModelERP = configBancoDadosControl.getModel();
                    configBancoDadosModelERP.setOpcaoBancoDados("Oracle");
                    configBancoDadosModelERP.setProduto("ERP");
                    configBancoDadosModelERP.setHost(model.getHostERP());
                    configBancoDadosModelERP.setBanco(model.getNomeBancoDadosERP());
                    configBancoDadosModelERP.setPorta(model.getPortaERP());
                    configBancoDadosModelERP.setUsuario(model.getUsuarioERP());
                    configBancoDadosModelERP.setSenha(model.getSenhaERP());

                    if (configBancoDadosControl.TestConnectionBancoDados(configBancoDadosModelERP)) {

                        ClienteController clienteControl = new ClienteController();

                        ClienteModel clienteModelERP = clienteControl.getModel();
                        clienteModelERP.setActionScript("C");
                        clienteModelERP.setHostERP(model.getHostERP());
                        clienteModelERP.setPortaERP(model.getPortaERP());
                        clienteModelERP.setNomeBancoDadosERP(model.getNomeBancoDadosERP());
                        clienteModelERP.setUsuarioERP(model.getUsuarioERP());
                        clienteModelERP.setSenhaERP(model.getSenhaERP());
                        clienteControl.getDadosERP(clienteModelERP);
                        if (clienteModelERP.getListaCliente().isEmpty()) {
                            System.out.println("Nenhum cliente cadastrado no ERP");
                        } else {
                            model.getClienteModel().setNumeroDocumento(clienteModelERP.getListaCliente().get(0).getNumeroDocumento());

                            ClienteModel clienteModel = clienteControl.getModel();
                            clienteModel.setActionScript("porNumeroDocumento");
                            clienteModel.setNumeroDocumento(model.getClienteModel().getNumeroDocumento());
                            clienteControl.getDados(clienteModel);
                            if (clienteModel.getListaCliente().isEmpty()) {
                                System.out.println("Nenhum cliente cadastrado com o numero de documento: " + model.getClienteModel().getNumeroDocumento());
                            } else {
                                model.getClienteModel().setCodigo(clienteModel.getListaCliente().get(0).getCodigo());

                                /**
                                 * Verificar se há alguma atualização pendente
                                 * no cronograma de atualização no servidor web
                                 */
                                CronogramaAtualizacaoController cronogramaControlERP = new CronogramaAtualizacaoController();
                                CronogramaAtualizacaoModel cronogramaModelERP = cronogramaControlERP.getModel();
                                cronogramaModelERP.setActionScript("porClienteSemConclusao");
                                cronogramaModelERP.getClienteModel().setCodigo(model.getClienteModel().getCodigo());
                                //alimentando a lista de atualizações pendentes
                                cronogramaControlERP.getDados(cronogramaModelERP);
                                if (cronogramaModelERP.getLista().isEmpty()) {
                                    System.out.println("Cliente não possui atualização pendente no cronograma de atualização.");
                                } else {

                                    /**
                                     * pega os dados da tlnk_cliente_versao do
                                     * cliente
                                     */
                                    AssociarClienteVersaoController clienteVersaoControlERP = new AssociarClienteVersaoController();
                                    AssociarClienteVersaoModel clienteVersaoModel = clienteVersaoControlERP.getModel();
                                    clienteVersaoModel.getClienteModel().setCodigo(model.getClienteModel().getCodigo());
                                    clienteVersaoModel.setActionScript("porCliente");
                                    //alimentando a lista com as versões associadas ao cliente no servidor web
                                    clienteVersaoControlERP.getDados(clienteVersaoModel);
                                    if (clienteVersaoModel.getListaClienteVersao().isEmpty()) {
                                        System.out.println("Cliente não possui nenhum versão lincada ao mesmo");
                                    }

                                    /**
                                     * confrontar o que está no cronograma com o
                                     * que está ativo na base do cliente
                                     */
                                    for (CronogramaAtualizacaoModel cronogramaModel : cronogramaModelERP.getLista()) {
                                        if (clienteVersaoModel.getClienteVersao(cronogramaModel.getVersaoModel().getCodigo(), cronogramaModel.getClienteModel().getCodigo()) != null) {
                                            /**
                                             * Persistindo os dados do
                                             * cronograma de atualização
                                             */
                                            CronogramaAtualizacaoModel cronogramaModelERPGravar = cronogramaControlERP.getModel();
                                            cronogramaModelERPGravar.setActionScript("U-Cronograma");
                                            cronogramaModelERPGravar.getColaboradorModel().setCodigo(UtilitariosCampos.getIntegerComboBox(comboBoxTecnico));
                                            cronogramaModelERPGravar.getClienteModel().setCodigo(model.getClienteModel().getCodigo());
                                            cronogramaModelERPGravar.getVersaoModel().setCodigo(cronogramaModel.getVersaoModel().getCodigo());
                                            cronogramaModelERPGravar.setObservacao(textAreaObservacao.getText());
                                            cronogramaModelERPGravar.setDataConclusao(formattedTextFieldDataSaida.getText());
                                            cronogramaModelERPGravar.setLocalRemota(UtilitariosCampos.getRespostaComboBox(comboBoxLocalRemota));
                                            cronogramaControlERP.setDados(cronogramaModelERPGravar);
                                        } else {
                                            System.out.println("Não consta na base do cliente a versão: " + cronogramaModelERP.getLista().get(0).getVersaoModel().getNome() + ", versão do cronograma de atualização.");
                                        }
                                    }
                                }
                            }
                        }
                    } else {
                        JOptionPane.showMessageDialog(null, "Não foi possível conectar no banco de dados do Servidor " + configBancoDadosModelERP.getProduto());
                        return;//para todo o processo
                    }
                }

                if (checkBoxNFE.isSelected()) {

                }

                if (checkBoxWMS.isEnabled()) {

                }
                if (checkBoxFrenteLoja.isSelected()) {

                    /**
                     * Verificar se os dados de conexão com o Firebird são
                     * validos. Se não conectar, o sistema irá interromper a
                     * execução dos passos
                     */
                    ConfigBancoDadosController configBancoDadosControl = new ConfigBancoDadosController();
                    ConfigBancoDadosModel configBancoDadosModelFrenteLojaSRV = configBancoDadosControl.getModel();
                    configBancoDadosModelFrenteLojaSRV.setOpcaoBancoDados("Firebird");
                    configBancoDadosModelFrenteLojaSRV.setProduto("Frente de Loja - SRV");
                    configBancoDadosModelFrenteLojaSRV.setHost(model.getHostFrenteLoja());
                    configBancoDadosModelFrenteLojaSRV.setBanco(model.getNomeBancoFrenteLojaSRV());
                    configBancoDadosModelFrenteLojaSRV.setPorta(model.getPortaFrenteLoja());
                    configBancoDadosModelFrenteLojaSRV.setUsuario(model.getUsuarioFrenteLoja());
                    configBancoDadosModelFrenteLojaSRV.setSenha(model.getSenhaFrenteLoja());

                    if (configBancoDadosControl.TestConnectionBancoDados(configBancoDadosModelFrenteLojaSRV)) {

                        ConfigBancoDadosModel configBancoDadosModelFrenteLojaECF = configBancoDadosControl.getModel();
                        configBancoDadosModelFrenteLojaECF.setOpcaoBancoDados("Firebird");
                        configBancoDadosModelFrenteLojaECF.setProduto("Frente de Loja - ECF");
                        configBancoDadosModelFrenteLojaECF.setHost(model.getHostFrenteLoja());
                        configBancoDadosModelFrenteLojaECF.setBanco(model.getNomeBancoFrenteLojaECF());
                        configBancoDadosModelFrenteLojaECF.setPorta(model.getPortaFrenteLoja());
                        configBancoDadosModelFrenteLojaECF.setUsuario(model.getUsuarioFrenteLoja());
                        configBancoDadosModelFrenteLojaECF.setSenha(model.getSenhaFrenteLoja());

                        if (configBancoDadosControl.TestConnectionBancoDados(configBancoDadosModelFrenteLojaECF)) {

                            ClienteController clienteControl = new ClienteController();

                            ClienteModel clienteModelFrenteLoja = clienteControl.getModel();
                            clienteModelFrenteLoja.setActionScript("C");
                            clienteModelFrenteLoja.setHostFrenteLoja(model.getHostFrenteLoja());
                            clienteModelFrenteLoja.setPortaFrenteLoja(model.getPortaFrenteLoja());
                            clienteModelFrenteLoja.setNomeBancoFrenteLojaECF(model.getNomeBancoFrenteLojaECF());
                            clienteModelFrenteLoja.setUsuarioERP(model.getUsuarioFrenteLoja());
                            clienteModelFrenteLoja.setSenhaERP(model.getSenhaFrenteLoja());
                            clienteControl.getDadosFrenteLoja(clienteModelFrenteLoja);
                            if (clienteModelFrenteLoja.getListaCliente().isEmpty()) {
                                System.out.println("Nenhum cliente cadastrado no Frente de Loja - ECF");
                            } else {
                                model.getClienteModel().setNumeroDocumento(clienteModelFrenteLoja.getListaCliente().get(0).getNumeroDocumento());

                                ClienteModel clienteModel = clienteControl.getModel();
                                clienteModel.setActionScript("porNumeroDocumento");
                                clienteModel.setNumeroDocumento(model.getClienteModel().getNumeroDocumento());
                                clienteControl.getDados(clienteModel);
                                if (clienteModel.getListaCliente().isEmpty()) {
                                    System.out.println("Nenhum cliente cadastrado com o numero de documento: " + model.getClienteModel().getNumeroDocumento());
                                } else {
                                    model.getClienteModel().setCodigo(clienteModel.getListaCliente().get(0).getCodigo());

                                    /**
                                     * Verificar se há alguma atualização
                                     * pendente no cronograma de atualização no
                                     * servidor web
                                     */
                                    CronogramaAtualizacaoController cronogramaControlFrenteLoja = new CronogramaAtualizacaoController();
                                    CronogramaAtualizacaoModel cronogramaModelFrenteLoja = cronogramaControlFrenteLoja.getModel();
                                    cronogramaModelFrenteLoja.setActionScript("porClienteSemConclusao");
                                    cronogramaModelFrenteLoja.getClienteModel().setCodigo(model.getClienteModel().getCodigo());
                                    //alimentando a lista de atualizações pendentes
                                    cronogramaControlFrenteLoja.getDados(cronogramaModelFrenteLoja);
                                    if (cronogramaModelFrenteLoja.getLista().isEmpty()) {
                                        System.out.println("Cliente não possui atualização pendente no cronograma de atualização.");
                                    } else {

                                        /**
                                         * pega os dados da tlnk_cliente_versao
                                         * do cliente
                                         */
                                        AssociarClienteVersaoController clienteVersaoControlFrenteLoja = new AssociarClienteVersaoController();
                                        AssociarClienteVersaoModel clienteVersaoModel = clienteVersaoControlFrenteLoja.getModel();
                                        clienteVersaoModel.getClienteModel().setCodigo(model.getClienteModel().getCodigo());
                                        clienteVersaoModel.setActionScript("porCliente");
                                        //alimentando a lista com as versões associadas ao cliente no servidor web
                                        clienteVersaoControlFrenteLoja.getDados(clienteVersaoModel);
                                        if (clienteVersaoModel.getListaClienteVersao().isEmpty()) {
                                            System.out.println("Cliente não possui nenhum versão lincada ao mesmo");
                                        }

                                        /**
                                         * confrontar o que está no cronograma
                                         * com o que está ativo na base do
                                         * cliente
                                         */
                                        for (CronogramaAtualizacaoModel cronogramaModel : cronogramaModelFrenteLoja.getLista()) {
                                            if (clienteVersaoModel.getClienteVersao(cronogramaModel.getVersaoModel().getCodigo(), cronogramaModel.getClienteModel().getCodigo()) != null) {
                                                /**
                                                 * Persistindo os dados do
                                                 * cronograma de atualização
                                                 */
                                                CronogramaAtualizacaoModel cronogramaModelFrenteLojaGravar = cronogramaControlFrenteLoja.getModel();
                                                cronogramaModelFrenteLojaGravar.setActionScript("U-Cronograma");
                                                cronogramaModelFrenteLojaGravar.getColaboradorModel().setCodigo(UtilitariosCampos.getIntegerComboBox(comboBoxTecnico));
                                                cronogramaModelFrenteLojaGravar.getClienteModel().setCodigo(model.getClienteModel().getCodigo());
                                                cronogramaModelFrenteLojaGravar.getVersaoModel().setCodigo(cronogramaModel.getVersaoModel().getCodigo());
                                                cronogramaModelFrenteLojaGravar.setObservacao(textAreaObservacao.getText());
                                                cronogramaModelFrenteLojaGravar.setDataConclusao(formattedTextFieldDataSaida.getText());
                                                cronogramaModelFrenteLojaGravar.setLocalRemota(UtilitariosCampos.getRespostaComboBox(comboBoxLocalRemota));
                                                cronogramaControlFrenteLoja.setDados(cronogramaModelFrenteLojaGravar);
                                            } else {
                                                System.out.println("Não consta no cronograma de atualização a versão: " + clienteVersaoModel.getVersaoModel().getNome());
                                            }
                                        }
                                    }
                                }
                            }
                        } else {
                            JOptionPane.showMessageDialog(null, "Não foi possível conectar no banco de dados do Servidor " + configBancoDadosModelFrenteLojaECF.getProduto());
                            return;//para todo o processo

                        }
                    } else {
                        JOptionPane.showMessageDialog(null, "Não foi possível conectar no banco de dados do Servidor " + configBancoDadosModelFrenteLojaSRV.getProduto());
                        return;//para todo o processo
                    }
                }

                if (checkBoxProducao.isSelected()) {

                }

                Consultar();
                LimparCampos();

            } else {
                JOptionPane.showMessageDialog(panelConsulta, "Você deve escolher uma ação clicando no botão Novo ou Editar.");
            }
        }
    }

    @Override
    public void LimparCampos() {
        UtilitariosCampos.getLimpezaCampos(tabbedPaneManutencao);
    }

    @Override
    public void ProximaAba(String Movimento) {
        int a = tabbedPaneManutencao.getSelectedIndex();
        int quantidadeAba = tabbedPaneManutencao.getTabCount() - 1;
        switch (Movimento) {
            case "Anterior":
                if (a != 0) {
                    tabbedPaneManutencao.setSelectedIndex(a - 1);
                }
                break;
            case "Proximo":
                if (a != quantidadeAba) {
                    tabbedPaneManutencao.setSelectedIndex(a + 1);
                }
                break;
        }
    }

    @Override
    public void TamanhoColunaTable() {
        int posicao = 0;
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_CLIENTE_SIZE);
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_COLABORADOR_SIZE);
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_PRODUTO_SIZE);
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_VERSAO_SIZE);
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_DATA_SIZE);
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_OBSERVACAO_SIZE);
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_REMOTA_LOCAL_SIZE);
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_DATA_SIZE);
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_MOTIVO_SIZE);
        UtilitariosCampos.setTamanhoColunaTable(jTableConsulta, posicao++, UtilitariosCampos.COLUNA_DATA_SIZE);
    }

    @Override
    public void Consultar() {
        model.setActionScript("C");
        jTableConsulta.setModel(control.getDadosTableModel(model));
        tabbedPaneManutencao.setSelectedIndex(0);
        textFieldConsultar.requestFocus();
        TamanhoColunaTable();
    }

    @Override
    public void CommitCampos() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public void CancelarOperacao() {
        LimparCampos();
        Consultar();
    }

    @Override
    public void CarregarVariaveis() {

        /**
         * Variaveis gerais
         */
        model.getColaboradorModel().setCodigo(UtilitariosCampos.getIntegerComboBox(comboBoxTecnico));
        model.setDataConclusao(formattedTextFieldDataSaida.getText());
        model.setLocalRemota(UtilitariosCampos.getRespostaComboBox(comboBoxLocalRemota));
        model.setObservacao(textAreaObservacao.getText());

        if (checkBoxERP.isSelected()) {
            model.setHostERP(UtilitariosCampos.getTextField(textFieldIpERP));
            model.setNomeBancoDadosERP(UtilitariosCampos.getTextField(textFieldNomeBancoERP));
            model.setPortaERP(UtilitariosCampos.getTextField(textFieldPortaERP));
            model.setUsuarioERP(UtilitariosCampos.getTextField(textFieldUsuarioERP));
            model.setSenhaERP(passwordFieldSenhaERP.getText());
        }

        /*     if (checkBoxNFE.isSelected()) {
         model.setHostNFE(UtilitariosCampos.getTextField(textFieldIpNFE));
         model.setNomeBancoNFE(UtilitariosCampos.getTextField(textFieldNomeBancoNFE));
         model.setPortaNFE(UtilitariosCampos.getTextField(textFieldPortaNFE));
         model.setUsuarioNFE(UtilitariosCampos.getTextField(textFieldUsuarioNFE));
         model.setSenhaNFE(passwordFieldSenhaNFE.getText());
         }*/

        /*if (checkBoxWMS.isSelected()) {
         model.setHostWMS(UtilitariosCampos.getTextField(textFieldIpWMS));
         model.setNomeBancoWMS(UtilitariosCampos.getTextField(textFieldNomeBancoWMS));
         model.setPortaWMS(UtilitariosCampos.getTextField(textFieldPortaWMS));
         model.setUsuarioWMS(UtilitariosCampos.getTextField(textFieldUsuarioWMS));
         model.setSenhaWMS(passwordFieldSenhaWMS.getText());
         }*/
        if (checkBoxFrenteLoja.isSelected()) {
            model.setHostFrenteLoja(UtilitariosCampos.getTextField(textFieldIpPDV));
            model.setNomeBancoFrenteLojaSRV(UtilitariosCampos.getTextField(textFieldNomeBancoSrvPDV));
            model.setNomeBancoFrenteLojaECF(UtilitariosCampos.getTextField(textFieldNomeBancoEcfPDV));
            model.setPortaFrenteLoja(UtilitariosCampos.getTextField(textFieldPortaPDV));
            model.setUsuarioFrenteLoja(UtilitariosCampos.getTextField(textFieldUsuarioPDV));
            model.setSenhaFrenteLoja(passwordFieldSenhaPDV.getText());
        }

        /*
         if (checkBoxProducao.isSelected()) {
         model.setHostProducao(UtilitariosCampos.getTextField(textFieldIpProducao));
         model.setNomeBancoProducao(UtilitariosCampos.getTextField(textFieldNomeBancoProducao));
         model.setPortaProducao(UtilitariosCampos.getTextField(textFieldPortaProducao));
         model.setUsuarioProducao(UtilitariosCampos.getTextField(textFieldUsuarioProducao));
         model.setSenhaProducao(passwordFieldSenhaProducao.getText());
         }*/
    }

    KeyAdapter pesquisaDados = new KeyAdapter() {
        @Override
        public void keyPressed(KeyEvent e) {

            switch (e.getKeyCode()) {
                case KeyEvent.VK_ENTER://Botão Enter
                    //model.setNomeRazao(textFieldConsultar.getText());
                    model.setActionScript("P");
                    jTableConsulta.setModel(control.getDadosTableModel(model));
                    TamanhoColunaTable();
                    break;
            }
        }
    };

    @Override
    public void InicializarListener() {
        //Adicionar escutado ao componente
        textFieldConsultar.addKeyListener(pesquisaDados);

    }

    @Override
    public void Start() {
        Consultar();
        CarregarDadosComboBox(model, null);
        InicializarListener();
        setExtendedState(MAXIMIZED_BOTH);
    }

    @Override
    public boolean ValidaCampos() {
        int ocorrencia = 0;
        /**
         * Ter ao menos um produto selecioado
         */
        int produtoSelecionado = 0;
        if (checkBoxERP.isSelected()) {
            if (!UtilitariosCampos.getValidarCampos(panelERP)) {
                tabbedPaneManutencao.setSelectedIndex(2);
                ocorrencia++;
            }
            produtoSelecionado++;

        }
        if (checkBoxNFE.isSelected()) {
            if (!UtilitariosCampos.getValidarCampos(panelNFE)) {
                tabbedPaneManutencao.setSelectedIndex(2);
                ocorrencia++;
            }
            produtoSelecionado++;
        }
        if (checkBoxFrenteLoja.isSelected()) {
            if (!UtilitariosCampos.getValidarCampos(panelPDV)) {
                tabbedPaneManutencao.setSelectedIndex(3);
                ocorrencia++;
            }
            produtoSelecionado++;
        }
        if (checkBoxWMS.isSelected()) {
            if (!UtilitariosCampos.getValidarCampos(panelWMS)) {
                tabbedPaneManutencao.setSelectedIndex(3);
                ocorrencia++;
            }
            produtoSelecionado++;
        }
        if (checkBoxProducao.isSelected()) {
            if (!UtilitariosCampos.getValidarCampos(panelProducao)) {
                tabbedPaneManutencao.setSelectedIndex(4);
                ocorrencia++;
            }
            produtoSelecionado++;
        }
        if (model.getActionScript().equals("I") || model.getActionScript().equals("U")) {
            if (!UtilitariosCampos.getValidarCampos(panelAbaDadosGerais)) {
                tabbedPaneManutencao.setSelectedIndex(1);
                ocorrencia++;
            }
        }
        if (produtoSelecionado == 0) {
            JOptionPane.showMessageDialog(panelConsulta, "Nenhum produto foi selecioado!!!");
            tabbedPaneManutencao.setSelectedIndex(1);
            checkBoxERP.requestFocus();
            return false;
        }

        if (!UtilitariosCampos.getValidarData(formattedTextFieldDataSaida.getText())) {
            tabbedPaneManutencao.setSelectedIndex(1);
            formattedTextFieldDataSaida.setForeground(Color.red);
            return false;
        }
        return ocorrencia <= 0;
    }

    @Override
    public void CarregarDadosComboBox(CronogramaAtualizacaoModel model, String actionScript
    ) {
        ColaboradorController colaboradorControl = new ColaboradorController();
        ColaboradorModel colaboradorModel = colaboradorControl.getModel();
        colaboradorModel.setCodigo(UtilitariosCampos.getUsuario());
        colaboradorModel.setActionScript("porCodigo");
        comboBoxTecnico.setModel(colaboradorControl.getDadosComboBoxModel(colaboradorModel));
    }

    @Override
    public void setFiltroCampo() {

        textAreaObservacao.setDocument(new setFiltroCampo(65535, "Textp", 'P'));
        textFieldConsultar.setDocument(new setFiltroCampo(50, "LetraNumeroRealEspaco"));

        textFieldIpERP.setDocument(new setFiltroCampo(50, "HostIP"));
        textFieldIpPDV.setDocument(new setFiltroCampo(50, "HostIP"));
        textFieldIpNFE.setDocument(new setFiltroCampo(50, "HostIP"));
        textFieldIpWMS.setDocument(new setFiltroCampo(50, "HostIP"));
        textFieldIpProducao.setDocument(new setFiltroCampo(50, "HostIP"));

        textFieldNomeBancoERP.setDocument(new setFiltroCampo(50, "LetraNumeroInteiro"));
        textFieldNomeBancoEcfPDV.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        textFieldNomeBancoSrvPDV.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        textFieldNomeBancoNFE.setDocument(new setFiltroCampo(50, "LetraNumeroInteiro"));
        textFieldNomeBancoWMS.setDocument(new setFiltroCampo(50, "LetraNumeroInteiro"));
        textFieldNomeBancoProducao.setDocument(new setFiltroCampo(50, "LetraNumeroInteiro"));

        textFieldPortaERP.setDocument(new setFiltroCampo(10, "NumeroInteiro"));
        textFieldPortaPDV.setDocument(new setFiltroCampo(10, "NumeroInteiro"));
        textFieldPortaNFE.setDocument(new setFiltroCampo(10, "NumeroInteiro"));
        textFieldPortaWMS.setDocument(new setFiltroCampo(10, "NumeroInteiro"));
        textFieldPortaProducao.setDocument(new setFiltroCampo(10, "NumeroInteiro"));

        textFieldUsuarioERP.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        textFieldUsuarioPDV.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        textFieldUsuarioNFE.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        textFieldUsuarioWMS.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        textFieldUsuarioProducao.setDocument(new setFiltroCampo(50, "Texto", 'P'));

        passwordFieldSenhaERP.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        passwordFieldSenhaPDV.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        passwordFieldSenhaNFE.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        passwordFieldSenhaWMS.setDocument(new setFiltroCampo(50, "Texto", 'P'));
        passwordFieldSenhaProducao.setDocument(new setFiltroCampo(50, "Texto", 'P'));
    }
}
